<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2020/12/16
  Time: 20:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="true" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>查看用户列表</title>
</head>
<body>
<%@ include file="adminBanner.jsp" %>
    <h1 style="margin-left: 3%;">查看用户列表</h1>
    <div class="userList" style="margin-left: 7%;">
        <h2 style="margin-left: 1%;">用户列表</h2>
        <ul class="userList">
            <c:forEach items="${userList.items}" var="item">
                <div>
                    userid: ${item.userID}, username: ${item.userName}
                    <c:if test="${item.lock eq false}">
                        未加锁  <a href="<c:url value="/admin/changeLock/${item.userID}" /> ">   点击加锁</a>
                    </c:if>
                    <c:if test="${item.lock eq true}">
                        已加锁  <a href="<c:url value="/admin/changeLock/${item.userID}" /> ">   点击解锁</a>
                    </c:if>

                </div>
                <hr>
            </c:forEach>
        </ul>
    </div>
    每页${userList.pageSize}个用户，第${userList.currentPageNo}/${userList.totalPageCount}页，共${userList.totalCount}个用户<br>
    <c:if test="${userList.previousPage}">
        <a href="<c:url value="/admin/userList?pageNo=${userList.currentPageNo-1}" />">上一页</a>
    </c:if>
    <c:if test="${userList.nextPage}">
        <a href="<c:url value="/admin/userList?pageNo=${userList.currentPageNo+1}" />">下一页</a>
    </c:if>
<%@ include file="footer.jsp" %>
</body>
</html>
